-
Notifications
You must be signed in to change notification settings - Fork 769
[SYCL] Remove IsDeprecatedDeviceCopyable
#16615
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This was discussed in intel#15342 (comment) and the consensus seemd to be that we should drop it right away in a separate PR, do it here. Technically, it is a breaking change that could also be considered a bugfix. An example of a class failing the updated check is ``` struct Kernel { Kernel(int); Kernel(const Kernel&) = default; Kernel& operator=(const Kernel&) { return *this; } // non-trivial }; ``` An additional minor reason (other than not being SYCL-conformant) to drop it right away is to save a tiny bit of compile time that is currently used to support something violating the spec.
aab026c
to
bec21d1
Compare
template <typename... Ts> | ||
struct is_device_copyable<sycl::detail::tuple<Ts...>> | ||
: std::bool_constant<(... && is_device_copyable<Ts>::value)> {}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A better way might be just making sycl::detail::tuple
trivially copyable automatically whenever all the contained types are, by fixing the implementation, but I'm not sure how big such a change would be or how to approach it.
Ping |
Looks like this broke CTS. Root cause: https://godbolt.org/z/vqan5Y9xM, so the issue is either in the CTS or in the clang FE.
in CTS would make it buildable again. @intel/dpcpp-cfe-reviewers , can you tell if clang's behavior is correct? |
Hmm... It is unclear why the defaulted destructor changes the behavior in clang. I also noticed that removing the const member changes the behavior. There seems to be some underlying bug but it is unclear to me whether |
I discussed this with Tom and we think this is a Clang bug. Can you file a JIRA for it? |
|
64941, assigned to you first. |
…ntel#16615) Restore (logically) previous condition while keeping the rest of cleanups in place. Deprecation warning never worked, so I'm not even trying to implement that.
This was discussed in
#15342 (comment) and the consensus seemed to be that we should drop it right away in a separate PR, do it here.
Technically, it is a breaking change that could also be considered a bugfix. An example of a class failing the updated check is
An additional minor reason (other than not being SYCL-conformant) to drop it right away is to save a tiny bit of compile time that is currently used to support something violating the spec.
This required some fixes in the reductions implementation to make sure the kernel we submit internally are actually device copyable.